from info.config.default import DefaultConfig
from info.config.producer import ProducerConfig
from info.config.text import TextConfig

config_dict = {
    "default":DefaultConfig,
    "text":TextConfig,
    "producer":ProducerConfig
}

def init_config(app,version="default"):
    config = config_dict[version]
    app.config.from_object(config)
    return config